<!DOCTYPE html>
<html lang="en" class="h-full">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="https://cdn.jsdelivr.net/gh/kitao/pyxel/wasm/pyxel.js"></script>
  </head>
  <body>
    <pyxel-run
      script="
        import js, base64, pyxel.cli
        with open('main.py', 'w') as f:
          f.write(js.parent.project.code)
        with open('my_resource.pyxres', 'wb') as f:
          f.write(base64.b64decode(js.parent.project.resource))
        pyxel.cli.run_python_script('main.py')
      "
    ></pyxel-run>
  </body>
</html>
